import { INSERT } from './constants'
export default function lsReducer(state = { list: ['a', 'b'] }, action) {
  switch (action.type) {
    case INSERT:
      const newList = [...state.list]
      newList.push(action.payload)
      return {
        ...state,
        list: newList,
      }
    default:
      return state
  }
}
